home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
X User Tools
/
X User Tools (O'Reilly and Associates)(1994).ISO
/
sources
/
asedit
/
buildu.x
< prev
Wrap
Text File
|
1994-10-02
|
2KB
|
55 lines
#!/bin/sh
# uncomment the next line to see more of the build process
#set -x
# BUILD script provided by Ready-to-Run Software, Inc.
# Copyright 1994 Ready-to-Run Software, Inc. All Rights Reserved.
BUILDDIR=`pwd`
SOURCEDIR=${SOURCEDIR-/cdrom/SOURCES}
if test ! -d $SOURCEDIR ; then
cd `dirname $0`/..; SOURCEDIR=`pwd`
echo Assuming SOURCEDIR is $SOURCEDIR
cd $BUILDDIR
fi
INSTALLDIR=${INSTALLDIR-/usr/local}
INSTALLSHAREDIR=${INSTALLSHAREDIR-/usr/local/share}
if test "$1" != ""; then
MACHINE=$1
fi
if test "$MACHINE" = ""; then
MACHINE=`$SOURCEDIR/../COMMON/GUESS UPPER`
echo "Assuming machine is $MACHINE"
fi
machine=$MACHINE
echo Ignore any errors about directories already existing
mkdir asedit
mkdir -p $INSTALLDIR
mkdir $INSTALLDIR/bin
mkdir $INSTALLDIR/lib
mkdir -p $INSTALLSHAREDIR
mkdir $INSTALLSHAREDIR/man
mkdir $INSTALLSHAREDIR/man/man1
mkdir $INSTALLSHAREDIR/doc
mkdir $INSTALLSHAREDIR/${SHAREPREFIX}bin
mkdir $INSTALLSHAREDIR/${SHAREPREFIX}lib
/bin/rm -f $BUILDDIR/zcat
/bin/ln -s $SOURCEDIR/../$MACHINE/BIN/ZCAT $BUILDDIR/zcat
DIR=asedit-1.2
cd $BUILDDIR/asedit
cat $SOURCEDIR/ASEDIT/ASEDIT12.GZ | $BUILDDIR/zcat -d -c | tar xvof -
cd $DIR
test -f $SOURCEDIR/ASEDIT/RTRPATCH.ASEDIT &&( sed -e "s;<installsharedir>;$INSTALLSHAREDIR;" -e "s;<prefix>;$SHAREPREFIX;" -e "s;<installdir>;$INSTALLDIR;" $SOURCEDIR/ASEDIT/RTRPATCH.ASEDIT | patch -p -s )
test -f $SOURCEDIR/ASEDIT/$MACHINE/ASEDIT \
&&( sed -e "s;<installsharedir>;$INSTALLSHAREDIR;" -e "s;<prefix>;$SHAREPREFIX;" -e "s;<installdir>;$INSTALLDIR;" $SOURCEDIR/ASEDIT/$MACHINE/ASEDIT | patch -b .rtr -p -s )
xmkmf
make asedit
if test "$RM" != "" ; then make install ; fi
if test "$RM" != "" ; then make install.man ; fi
cd $BUILDDIR/asedit
cd $BUILDDIR
if test "$RM" != "" ; then rm -rf $BUILDDIR/asedit ; fi